package com.example.udpDemo.socket.design.builder;

import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;

/**
 * @author wangdachuan
 * @version 1.0
 * @date 2023/3/31 21:02
 **/
@Slf4j
public class BuilderTest {

    public static void main(String[] args) {
        PhoneBuilder builder = new PhoneBuilderImpl();
        PhoneMaker maker = new PhoneMaker(builder);
        maker.makePhone("Apple", "iPhone 14 Pro Max", 2048, BigDecimal.valueOf(1299.00));

        Phone phone = builder.getPhone();
        log.info("Brand: {}", phone.getBrand());
        log.info("Model: {}", phone.getModel());
        log.info("Memory: {}", phone.getMemory() + "GB");
        log.info("Price: ${}", phone.getPrice());
    }

}
